// Here is an example of copying a string into a char array without StrCpy
// By Ben 04/10/2018

#include <iostream>
using namespace std;

void StrCopy(char *Dest, char*Src){
	int x = 0;
	//While not null string
	while (*Src != '\0'){
		//Set Desk[x] to the Src
		Dest[x] = *Src;
		//INC counter
		x++;
		//Move along Src
		Src++;
	}
	//Add a null char to end the string
	Dest[x] = '\0';
}

int main(){
	//Declare a variable to hold the string.
	char Name[30];

	//Copy the string into Name array
	StrCopy(Name, "I like C++ Programming.");
	//Print out the contents of Name
	std::cout << Name << endl;

	system("pause");
	return 0;
}